#ifndef SP_DRIVER_RTL8139_H
#define SP_DRIVER_RTL8139_H

#define RTL8139_MAC05	0x00
#define RTL8139_MAC07	0x08
#define RTL8139_CMD		0x37
#define RTL8139_IMR		0x3C
#define RTL8139_ISR		0x3E
#define RTL8139_CONF1	0x52
#define RTL8139_RBSTART	0x30
#define RTL8139_IO_BASE	1
#include <system/regs.h>
#include <system/mod.h>


extern module_t rtl8139_module;

char rtl8139_buff_rx[8192+16];

uint32_t rtl8139_init();
void rtl8139_callback(regs_t *);
void rtl8139_reset();
uint32_t rtl8139_shut();
uint32_t rtl8139_read(uint8_t *, uint32_t, char *);
uint32_t rtl8139_write(uint8_t *, uint32_t, char *);

#endif
